package com.spring.aop.service.impl;

import com.spring.aop.domain.UsersAop;
import com.spring.aop.mapper.UsersAopMapper;
import com.spring.aop.service.UsersAopService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.TooManyListenersException;

/**
 * @ClassName UsersAopServiceImpl
 * @Description TODO:
 * @Author 12994
 * @Date 2024/10/19 12:14
 * @Version 1.0
 **/
// 业务层接口注解
@Service("usersAopService")
public class UsersAopServiceImpl implements UsersAopService {

    // 注入点注解
    @Resource(name = "usersAopMapper")
    private UsersAopMapper usersAopMapper;

    @Override
    public ArrayList<UsersAop> list() {
        return usersAopMapper.list();
    }

    @Override
    public int add(UsersAop usersAop) {
        return usersAopMapper.add(usersAop);
    }

    @Override
    public int update(UsersAop usersAop) {
        return usersAopMapper.update(usersAop);
    }

    @Override
    public int delete() {
        return usersAopMapper.delete();
    }

    @Override
    public void throwError() {
        int a = 12 / 0;
    }
}
